﻿using Klear.Library.Models;
using SQLite;

namespace Klear.Library.Services;

public interface IBudgetService
{
    // 定义加载预算设置的接口
    Task<BudgetModel> LoadBudgetSettingsAsync();

    // 定义保存预算设置的接口
    Task SaveBudgetSettings(BudgetModel budgetModel);

    // 定义计算实际支出的接口
    Task<decimal> CalculateActualSpending(DateTime startDate, DateTime endDate);
    
    Task<bool> HasOverlappingBudget(DateTime startDate, DateTime endDate, int? excludeId = null);

    Task<List<BudgetModel>> GetCurrentAndFutureBudgetsAsync();

    Task DeleteBudgetAsync(BudgetModel budget);
    
    Task<BudgetModel> GetCurrentMonthBudgetAsync();
}